<div id='div'>
     <div id='img'>
	    <img src='/image/hmnote8pro_white.jpg' width='100%' height='100%'/>
	 </div>
	 <div id='details'>
	    <p>红米note8pro</p>
		<p>限时抢购，只要199￥</p>
		<p>数量：剩余<i>{$num | default=0}</i></p>
		<p style='width:100px;height:30px;background:#ff0033;border-radius:5px;line-height:30px;color:white;text-align:center;cursor:pointer;' id='djs' onclick='qinggou()'></p>
	 </div>
</div>
<script>
var start;
var clear;
var a;
   function djs(){
       var time={$time};
       var time2={$time2};
        a=parseInt(time)-parseInt(time2);
	   start=setInterval(function(){
	       a--;	   
		   if(a<=0){
			   clear=clearInterval(start);
		       document.getElementById('djs').innerHTML="抢购";
		   }else{
		      document.getElementById('djs').innerHTML=a+"开始抢购";
		   }
	   },1000);
	   
   }
   djs();
   function qinggou(){
      if(a>0){return};
	  location.href='ms/qianggou';
   }
</script>
<style>
   #div{
      width:300px;
	  height:200px;
	  margin:0px auto;
	  border:1px solid #ccc;
   }
   #img,#details{
      width:50%;
	  height:150px;
	  float:left;
   }
   #details{
      
   }
</style>